package cn.ok.func;

import cn.ok.domains.ParamResult;
import lombok.extern.slf4j.Slf4j;

/**
 * @author kyou on 2022/3/17 10:57
 */
@Slf4j
public class Func {
    public static int i = 1;

    public static boolean eq(String str, Object obj1, Object obj2) {
        boolean r = obj1.equals(obj2);
        log.info("{}: obj1: {}; obj2: {}; eq: {}", str, obj1, obj2, r);
        return r;
    }

    public static boolean infoT(String str, Object obj) {
        log.info("{}: {}", str, obj);
        return true;
    }

    public static boolean infoF(String str, Object obj) {
        log.info("{}: {}", str, obj);
        return false;
    }

    public static ParamResult paramTable(Object obj) {
        return new ParamResult(true, "IsHit!");
    }

    public static int cnt() {
        return i++;
    }
}
